package com.chinacoal.microservice.api.model.resource;

import java.util.ArrayList;

public class NewPageCanvasData extends CanvasData {

	protected String newPageType;

	public NewPageCanvasData(){
		this.type = this.getNewPageType();
	}
	
	public NewPageCanvasData addFormCanvasData(FormCanvasData formCanvasData){
		if(data == null){
			this.data = new ArrayList<Object>();
		}
		this.data.add(formCanvasData);
		return this;
	}
	
	public NewPageCanvasData addTableCanvasData(TableCanvasData tableCanvasData){
		if(data == null){
			this.data = new ArrayList<Object>();
		}
		this.data.add(tableCanvasData);
		return this;
	}
	
	public NewPageCanvasData addNewPageCanvasData(NewPageCanvasData newPageCanvasData){
		if(data == null){
			this.data = new ArrayList<Object>();
		}
		this.data.add(newPageCanvasData);
		return this;
	}
	
	public NewPageCanvasData addTabPageCanvasData(TabPageCanvasData tabPageCanvasData){
		if(data == null){
			this.data = new ArrayList<Object>();
		}
		this.data.add(tabPageCanvasData);
		return this;
	}

	public String getNewPageType() {
		return newPageType;
	}

	public void setNewPageType(String newPageType) {
		this.type = newPageType;
	}
}
